import torch
import torch.nn as nn
import torch.nn.functional as F

input = torch.randn(5,3,10)
#建立一个rnn对象
rnn = nn.RNN(10,20,3)
#处理rnn
output , hn = rnn(input)
print(output.shape,hn.shape)